Skip to content

Add CI that builds and runs every example#598

Merged
padelsbach merged 111 commits into
wolfSSL:masterfrom
aidangarske:ci-matrix
Jul 23, 2026
Merged

Add CI that builds and runs every example#598
padelsbach merged 111 commits into
wolfSSL:masterfrom
aidangarske:ci-matrix

Conversation

@aidangarske

@aidangarske aidangarske commented Jul 15, 2026

Copy link
Copy Markdown
Member

Adds CI that builds and runs every example against wolfSSL master and the latest stable tag, asserting on real output — not just exit 0 — and fixes the example bugs that blocked those runs from going green.

CI

  • Manifest-driven harness (run_example.py + examples-manifest.yml): build → run → assert expected output.
  • Per-target workflows for environments that need special toolchains: ESP32, Android, RT1060, UEFI, SGX, PSA/mbedTLS, device sims (SE050, ATECC608, STSAFE, TROPIC01, STM32, PIC32MZ), DTLS multicast, Windows/MSVC, cross-arch (m32/aarch64/s390x), sanitizers/valgrind/cppcheck, config-matrix.
  • Nightly runs everything vs master + stable and triages failures into per-directory GitHub issues (retry-once, then flake-vs-real classification).
  • Every network fetch (git clone, download, docker pull) is wrapped in a retry so a transient blip does not fail a job.

Fixes

Each is its own commit:

  • Expired fixtures — regenerated CRL + certs that silently broke the CRL/verify examples.
  • Wrong exit codes — servers/examples that "passed" by returning a byte count or an unconditional -1; they now fail when they should.
  • Never-worked examples — PQ/ML-DSA/ML-KEM API ports, a client-cert-less resume, identical XTS key halves.
  • Toolchain drift — ESP-IDF 5.x ENC28J60 + PHY ports, RT1060 cross-build, UEFI freestanding, Android NDK/API-31, mynewt 64-bit.
  • Real bugs — a custom-IO double-free/use-after-free, DTLS resume-on-close_notify + record-spanning, TLS 1.3 early-data session-ticket handling.

Upstream wolfSSL bugs this CI surfaced

Examples are marked known-fail and gated per ref with fixed_on; drop the marker when each merges:

Copilot AI review requested due to automatic review settings July 15, 2026 00:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a comprehensive GitHub Actions CI system to build and (where possible) run every example in this repository against wolfSSL master and the latest stable tag(s), using a manifest-driven matrix so failures are isolated to per-example jobs.

Changes:

  • Introduces manifest-driven CI workflows (host/emulated/cross) plus a nightly triage workflow that retries, classifies flakes vs real failures, and can file/update issues.
  • Adds Python harness/scripts to generate matrices, enforce “coverage” (no buildable example directory left unaccounted for), run examples with output assertions, and collect artifacts for triage.
  • Updates many examples/Makefiles/scripts/fixtures so they build/run reliably under CI (exit statuses, paths to certs, linking flags, regenerated CRL/certs, etc.).

Reviewed changes

Copilot reviewed 62 out of 64 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
X9.146/Makefile Makefile header tweak for X9.146 examples
x509_acert/README.md Fix build/run instructions and cert paths
x509_acert/Makefile Make OpenSSL prefix optional; adjust lib paths
uefi-static/Makefile Make libgcc/gnu-efi paths less distro-specific
tls/server-tls13.c Ensure successful exit status after shutdown
tls/server-tls13-certauth-clienthello.c Ensure successful exit status after shutdown
tls/server-tls-posthsauth.c Ensure successful exit status after shutdown
tls/client-tls13-resume.c Load client cert/key and CA separately
tls/client-tls.c Load client cert/key and CA separately
staticmemory/memory-bucket-optimizer/tester/Makefile Add include/lib paths for wolfSSL
staticmemory/memory-bucket-optimizer/optimizer/Makefile Add include/lib paths for wolfSSL
staticmemory/Makefile Correct Makefile title/comment
signature/sigtest/Makefile Make OpenSSL path optional and clearer
SGX_Linux/sgx_t.mk Update SGX C++ runtime library name
scripts/run-all-examples.sh Add local manifest-driven runner script
psa/Makefile Fix include path and guard empty PSA_INCLUDE
pq/stateful_hash_sig/xmss_example.c Remove redundant include
pq/stateful_hash_sig/lms_example.c Remove redundant include
pq/ml_kem/README.md Switch build instructions to make
pq/ml_kem/ml_kem.c Update include/header usage; simplify main signature
pq/ml_kem/Makefile Add Makefile for ML-KEM example
pq/ml_dsa/ml_dsa.c Update to FIPS 204 ctx APIs; fix exit code
pq/ml_dsa/Makefile Fix clean target artifacts list
pkcs7/scripts/runall.sh Fix ordering + ensure failures exit non-zero
pkcs7/scripts/openssl-verify.sh Gate on runall, add failure accounting, improve checks
pkcs7/Makefile Correct Makefile title and zlib comment
pkcs11/Makefile Correct Makefile title/comment
pk/srp/Makefile Fix WOLFSSL_INSTALL_DIR prefix
pk/enc-through-sign-rsa/rsa-public-decrypt-app.c Normalize return code from length-returning API
embedded/Makefile Adjust linux-specific target list handling
ecc/ecc-params.c Handle negative lengths; normalize exit status
ebpf/tls-uprobe-trace/Makefile Add wolfSSL include/lib flags
dtls/server-dtls-rw-threads.c Fix cert paths for CI execution
dtls/client-dtls-rw-threads.c Fix cert paths for CI execution
custom-io-callbacks/file-server/file-server.c Fix server return codes / cleanup flow
custom-io-callbacks/file-server/check.sh Make server/client orchestration bounded and reliable
custom-io-callbacks/file-client/file-client.c Fix client return codes
crypto/keywrap/Makefile Add Makefile for keywrap example
crypto/aes-modes/aes-xts.c Fix XTS key halves to be distinct
certvfy/Makefile Add include/lib flags for wolfSSL
certs/crl/regenerate-crl.sh Add script to regenerate CRL fixture
certs/crl/crl.pem Update CRL fixture to unexpired version
certmanager/README.md Fix example invocation name
certmanager/certverify.c Ensure successful exit status
certmanager/certloadverifybuffer.c Update embedded cert fixtures
certgen/Makefile Add Makefile header/comment
certgen/csr_w_ed25519_example.c Normalize return code from length-returning API
can-bus/Makefile Add include/lib flags for wolfSSL
can-bus/generate_ssl.sh Cap CN length to X.509 limits
btle/common/btle-sim.c Ignore SIGPIPE to avoid FIFO-close crashes
.gitignore Ignore new binaries/pycache; fix typo
.github/workflows/nightly.yml Add scheduled nightly orchestration
.github/workflows/examples.yml Add host-tier matrix workflow + coverage gate
.github/workflows/emulated.yml Add emulated-tier workflow (TPM/SGX/CAN/UEFI)
.github/workflows/cross-build.yml Add cross-build workflow (ESP32/Pico/etc.)
.github/workflows/ci-triage.yml Add triage workflow for nightly results
.github/workflows/_resolve-wolfssl.yml Add reusable wolfSSL ref resolution workflow
.github/scripts/run_example.py Add example harness (build/run/assert/output/artifacts)
.github/scripts/manifest.py Add manifest loader + matrix generator + coverage checker
.github/scripts/issue_store.py Add issue identity/body/state machine + scrubbing
.github/scripts/ci_triage.py Add triage logic (retry, classify, issues, AI advisory)
.github/examples-manifest.yml Add source-of-truth manifest for CI coverage/matrix
.github/actions/setup-wolfssl/action.yml Add composite action to build/cache/install wolfSSL

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread custom-io-callbacks/file-server/file-server.c
Comment thread custom-io-callbacks/file-server/file-server.c Outdated
Comment thread custom-io-callbacks/file-server/file-server.c
Comment thread custom-io-callbacks/file-client/file-client.c
Comment thread .github/examples-manifest.yml Outdated
Comment thread uefi-library/src/driver.c
Comment thread uefi-library/src/test_app.c Outdated
Comment thread .github/workflows/uefi.yml
Comment thread .github/workflows/emulated.yml Outdated
Comment thread .github/workflows/analysis.yml Outdated
Comment thread .github/workflows/cmake.yml
Comment thread .github/workflows/lint.yml Outdated
Comment thread .github/scripts/se050-run.sh Outdated
@padelsbach

Copy link
Copy Markdown
Contributor

General comment: I'd argue the build+test scripts should not live in the CI dir, and should not be shell scripts. make check for each applicable example would be more canonical and perhaps closer to the end-user environment. (And it's how Provider runs CI as well.)

Ofc, keep the ones that don't fit that model (eg Android)

Comment thread .github/workflows/analysis.yml Outdated
Comment thread .github/scripts/lint.sh
Comment thread .github/examples-manifest.yml Outdated
Comment thread .github/examples-manifest.yml Outdated
Comment thread pkcs7/Makefile
Comment thread pk/rsa/Makefile
Comment thread ecc/Makefile Outdated
Comment thread staticmemory/memory-bucket-optimizer/optimizer/Makefile Outdated
Comment thread .github/examples-manifest.yml
Comment thread .github/examples-manifest.yml Outdated
Comment thread .github/workflows/hsm.yml Outdated
Comment thread staticmemory/memory-bucket-optimizer/optimizer/Makefile Outdated
Comment thread crypto/pkcs12/Makefile Outdated
Comment thread pk/rsa-kg/Makefile Outdated
Comment thread staticmemory/Makefile Outdated
Comment thread staticmemory/memory-bucket-optimizer/optimizer/Makefile Outdated
Comment thread certs/check-expiry.sh Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants